﻿@model ManagementSystem.ViewModels.TodoViewModel

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">
        <legend>Todo</legend>
        
        <input type="hidden" name="PlanId" value="@ViewBag.PlanId"/>

        <div class="control-group">
            @Html.LabelFor(model => model.Title, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Priority, new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("Priority")
                @Html.ValidationMessageFor(model => model.Priority, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.State, new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("State")
                @Html.ValidationMessageFor(model => model.State, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="form-actions no-color">
            <input type="submit" value="Create" class="btn" />
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to plan", "Details", new { controller = "Plans", area = "", id = ViewBag.PlanId })
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

